using Serpis;
using System;
namespace PVenta
{
	[Label("Articulos")]
	public class ArticuloListView : EntityListView
	{
		private string consulta = "select a.Id as Id, a.Nombre as Nombre, a.Categoria.Nombre as Categoria from Articulo a left join a.Categoria c";

		public ArticuloListView () : base(typeof(Articulo), typeof(ArticuloView))
		{
			label.LabelProp= "Nombre de articulo: ";
			init();
		}
		
		protected override string getSql() 
		{
			return string.Format(consulta, entry.Text);
		}
	}
}
